package com.example.m2.service.impl;


import com.example.m2.mapper.M2Mapper;
import com.example.service1.common.pojo.M2;
import com.example.m2.service.M2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class M2ServiceImpl implements M2Service {

    @Autowired
    private M2Mapper m2Mapper;

    @Override
    public M2 updateInfo(M2 m2) {
        int i = m2Mapper.updateInfo(m2);
        if(i!=0){
            return m2Mapper.selectById(m2.getId());
        }
        return null;
    }
}
